<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.org/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>车辆列表</title>
    <link rel="stylesheet" th:href="@{/resources/layui/css/layui.css}">
</head>
<body>
<script th:src="@{/resources/layui/layui.js}"></script>
<script th:inline="none">
    //一般直接写在一个js文件中
    layui.use(['layer', 'form','table'], function(){
        var layer = layui.layer,
            form = layui.form,
            table=layui.table,
            $=layui.jquery;
        var tableVehicle=table.render({
            elem:'#remindTable',
            height:425,
            url:'/remind/getRemindList',
            id:'remindListTable',
            page:true,
            limits:[3,6,9,12],
            limit:3,
            done:function(resp){
                if(resp.code==201){
                    layer.msg(resp.message);
                }
            },
            cols:[[
                {field: 'id', title: '编号'},
                {field:'vehiclefiles',title:'车牌号码',templet:function(obj){
                    return obj.vehiclefiles.vehiclenum;
                }},
                {field:'expiretime',title:'到期时间'},
                {field:'typee',title:'提醒类别'},
                {title:'操作',width:100,templet:'#remindBar',fixed:"right",align:"center"}
            ]]
        });
        //年检、保养、保险到期检查
        $.ajax({
            type:"get",
            url:"/remind/checkExpiretime",
            success:function(resp){
                if(resp.code==211){
                    layer.msg(resp.message);
                }
            }
        });

    });
</script>
<table id="remindTable" lay-filter="remindTableList"></table>
<script type="text/html" id="remindBar">
    <a class="layui-btn layui-btn-xs layui-btn-primary" lay-event="goHandle">去处理</a>
</script>
</body>
</html>